import allure


def none_to_empty(value):
    return value if value is not None else ''


def y_n_to_yes_no(value):
    if value == 'Y':
        return 'Yes'
    elif value == 'N':
        return 'No'
    return value


def assert_equal_with_allure(label, actual, expected):
    with allure.step(f"Validation: {label} - Expected='{expected}', Actual='{actual}'"):
        assert actual == expected, f"{label} mismatch. Actual: {actual}, Expected: {expected}"
